package com.test.zhangxin.jianpin.widget;

import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.ViewConfiguration;

/**
 * Created by MEIIT on 2016/9/9.
 *
 */
public class WrapContentRecycleView extends RecyclerView{

    private int downX;
    private int downY;
    private int mTouchSlop;
    public WrapContentRecycleView(Context context) {
        super(context);
        mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
    }

    public WrapContentRecycleView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
                MeasureSpec.AT_MOST);
        //setMeasuredDimension(widthMeasureSpec,expandSpec);
        super.onMeasure(widthMeasureSpec, expandSpec);

    }


}
